package com.block.product.enums;


import cn.hutool.core.util.StrUtil;
import lombok.Getter;

@Getter
public enum UnionTypeEnum {

    DEFAULT("DEFAULT", "默认登陆")
    ,YONGQIANFENQI("YONGQIANFENQI", "用钱分期")
    ,QIANXIAOHUA("QIANXIAOHUA", "乾小花")
    ,MENGXINHUA("MENGXINHUA", "萌薪花")
    ,WEIJIEHUA("WEIJIEHUA", "微借花")
    ,QUJIHUA("QIJIHUA","趣记花")
    ,HUARONG("HUARONG","花融")
    ,YINGDIAN("YINGDIAN","金穗花")
    ,YUEDAIBAO("YUEDAIBAO","悦贷宝")
    ,RONGYOUKE("RONGYOUKE","融优客")
    ,KEDAI("KEDAI","可贷")
    ,YICHEHANG("YICHEHANG","可贷")
    ,HAOHANYOUJIE("HAOHANYOUJIE","浩瀚有借")
    ,WEIXIAOFEIAPIS("WEIXIAOFEIAPIS","微消费")
    ,CHEDIRONG("CHEDIRONG","车抵融")
    ;

    private String value;
    private String name;

    UnionTypeEnum(String value, String name){
        this.value = value;
        this.name = name;
    }

    public static UnionTypeEnum getEntityByType(String actionType){
        for (UnionTypeEnum typeEnum : values()) {
            if (StrUtil.equals(typeEnum.getValue(), actionType)){
                return typeEnum;
            }
        }
        return null;
    }
}
